home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
MAPIUTIL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-13
|
31KB
|
901 lines
/*
* M A P I U T I L . H
*
* Definitions and prototypes for utility functions provided by MAPI
* in MAPI[xx].DLL.
*
* Copyright 1986-1996 Microsoft Corporation. All Rights Reserved.
*/
#ifndef _MAPIUTIL_H_
#define _MAPIUTIL_H_
#pragma option -b
#ifdef __BORLANDC__
#pragma option -b.
#include <pshpack8.h>
#pragma option -b
#endif
#if defined (WIN32) && !defined (_WIN32)
#define _WIN32
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MAPIX_H
#pragma option -b.
#include <mapix.h>
#pragma option -b
#endif
#ifdef WIN16
#pragma option -b.
#include <storage.h>
#pragma option -b
#endif
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
#endif
/* IMAPITable in memory */
/* ITableData Interface ---------------------------------------------------- */
DECLARE_MAPI_INTERFACE_PTR(ITableData, LPTABLEDATA);
typedef void (STDAPICALLTYPE CALLERRELEASE)(
ULONG ulCallerData,
LPTABLEDATA lpTblData,
LPMAPITABLE lpVue
);
#define MAPI_ITABLEDATA_METHODS(IPURE) \
MAPIMETHOD(HrGetView) \
(THIS_ LPSSortOrderSet lpSSortOrderSet, \
CALLERRELEASE FAR * lpfCallerRelease, \
ULONG ulCallerData, \
LPMAPITABLE FAR * lppMAPITable) IPURE; \
MAPIMETHOD(HrModifyRow) \
(THIS_ LPSRow) IPURE; \
MAPIMETHOD(HrDeleteRow) \
(THIS_ LPSPropValue lpSPropValue) IPURE; \
MAPIMETHOD(HrQueryRow) \
(THIS_ LPSPropValue lpsPropValue, \
LPSRow FAR * lppSRow, \
ULONG FAR * lpuliRow) IPURE; \
MAPIMETHOD(HrEnumRow) \
(THIS_ ULONG ulRowNumber, \
LPSRow FAR * lppSRow) IPURE; \
MAPIMETHOD(HrNotify) \
(THIS_ ULONG ulFlags, \
ULONG cValues, \
LPSPropValue lpSPropValue) IPURE; \
MAPIMETHOD(HrInsertRow) \
(THIS_ ULONG uliRow, \
LPSRow lpSRow) IPURE; \
MAPIMETHOD(HrModifyRows) \
(THIS_ ULONG ulFlags, \
LPSRowSet lpSRowSet) IPURE; \
MAPIMETHOD(HrDeleteRows) \
(THIS_ ULONG ulFlags, \
LPSRowSet lprowsetToDelete, \
ULONG FAR * cRowsDeleted) IPURE; \
#undef INTERFACE
#define INTERFACE ITableData
DECLARE_MAPI_INTERFACE_(ITableData, IUnknown)
{
BEGIN_INTERFACE
MAPI_IUNKNOWN_METHODS(PURE)
MAPI_ITABLEDATA_METHODS(PURE)
};
/* Entry Point for in memory ITable */
/* CreateTable()
* Creates the internal memory structures and object handle
* to bring a new table into existence.
*
* lpInterface
* Interface ID of the TableData object (IID_IMAPITableData)
*
* lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer
* Function addresses are provided by the caller so that
* this DLL allocates/frees memory appropriately.
* lpvReserved
* Reserved. Should be NULL.
* ulTableType
* TBLTYPE_DYNAMIC, etc. Visible to the calling application
* as part of the GetStatus return data on its views
* ulPropTagIndexColumn
* Index column for use when changing the data
* lpSPropTagArrayColumns
* Column proptags for the minimum set of columns in the table
* lppTableData
* Address of the pointer which will receive the TableData object
*/
STDAPI_(SCODE)
CreateTable( LPCIID lpInterface,
ALLOCATEBUFFER FAR * lpAllocateBuffer,
ALLOCATEMORE FAR * lpAllocateMore,
FREEBUFFER FAR * lpFreeBuffer,
LPVOID lpvReserved,
ULONG ulTableType,
ULONG ulPropTagIndexColumn,
LPSPropTagArray lpSPropTagArrayColumns,
LPTABLEDATA FAR * lppTableData );
/* HrGetView()
* This function obtains a new view on the underlying data
* which supports the IMAPITable interface. All rows and columns
* of the underlying table data are initially visible
* lpSSortOrderSet
* if specified, results in the view being sorted
* lpfCallerRelease
* pointer to a routine to be called when the view is released, or
* NULL.
* ulCallerData
* arbitrary data the caller wants saved with this view and returned in
* the Release callback.
*/
/* HrModifyRows()
* Add or modify a set of rows in the table data
* ulFlags
* Must be zero
* lpSRowSet
* Each row in the row set contains all the properties for one row
* in the table. One of the properties must be the index column. Any
* row in the table with the same value for its index column is
* replaced, or if there is no current row with that value the
* row is added.
* Each row in LPSRowSet MUST have a unique Index column!
* If any views are open, the view is updated as well.
* The properties do not have to be in the same order as the
* columns in the current table
*/
/* HrModifyRow()
* Add or modify one row in the table
* lpSRow
* This row contains all the properties for one row in the table.
* One of the properties must be the index column. Any row in
* the table with the same value for its index column is
* replaced, or if there is no current row with that value the
* row is added
* If any views are open, the view is updated as well.
* The properties do not have to be in the same order as the
* columns in the current table
*/
/* HrDeleteRows()
* Delete a row in the table.
* ulFlags
* TAD_ALL_ROWS - Causes all rows in the table to be deleted
* lpSRowSet is ignored in this case.
* lpSRowSet
* Each row in the row set contains all the properties for one row
* in the table. One of the properties must be the index column. Any
* row in the table with the same value for its index column is
* deleted.
* Each row in LPSRowSet MUST have a unique Index column!
* If any views are open, the view is updated as well.
* The properties do not have to be in the same order as the
* columns in the current table
*/
#define TAD_ALL_ROWS 1
/* HrDeleteRow()
* Delete a row in the table.
* lpSPropValue
* This property value specifies the row which has this value
* for its index column
*/
/* HrQueryRow()
* Returns the values of a specified row in the table
* lpSPropValue
* This property value specifies the row which has this value
* for its index column
* lppSRow
* Address of where to return a pointer to an SRow
* lpuliRow
* Address of where to return the row number. This can be NULL
* if the row number is not required.
*
*/
/* HrEnumRow()
* Returns the values of a specific (numbered) row in the table
* ulRowNumber
* Indicates row number 0 to n-1
* lppSRow
* Address of where to return a